package com.library.management.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class HealthController {

    @GetMapping("/health")
    public Map<String, String> health() {
        return Map.of("status", "UP", "service", "book-management");
    }

    @GetMapping("/")
    public Map<String, String> home() {
        return Map.of(
                "message", "图书管理系统后端API",
                "version", "1.0.0",
                "status", "运行中",
                "docs", "http://localhost:8080/swagger-ui.html"
        );
    }
}